<template>
	<view class="content">
		<merchant-apply  v-if="showPage == 'apply'" />
		<merchant-advertising-list v-if="showPage == 'center'" />
	</view>
</template>

<script>
	import {
		certificationStatusInquiry
	} from '@/api/user';
	export default {
		data() {
			return {
				showPage:''
			};
		},
		onLoad(option) {
			var _this = this;
			certificationStatusInquiry().then(res => {
				if (res.code == 1) {
					if(res.data.certification_status == 'success'){
						_this.showPage = 'center';
					}else if(res.data.certification_status == 'fail'){
						_this.showPage = 'apply';
					}
				}
			})
		},
	}
</script>